<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/WEB-INF/jsp/commons/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>E-天下商旅</title>
<link href="${ctx}/resources/css/page_login.css" rel="stylesheet"
	type="text/css">
</head>

<body>

	<div class="header">
		<h1>
			<a href="http://www.e-atw.com"  title="e天下商旅"><img
				src="${ctx}/resources/img/logo.gif" alt="e天下商旅" /></a>
		</h1>
	</div>


	<div class="main_box">
		<div class="main cf">
			<div class="content cf">
			   <div class="login_box">				
				<form action="${ctx}/login/validate" method="post">					
					<div>
						<label><i>* </i>用户名</label> <input type="text" onfocus="clearAccount();" class="input"
							name="account" id="account" /><span><c:if test="${error == 1}">用户名或密码错误</c:if></span>
					</div>
					<div>
						<label><i>* </i>密码</label> <input type="password" class="input"
							name="password" id="password" /><span></span>
					</div>					<div class="yzm">
						<label><i>* </i>验证码</label> <input type="text" style="width: 70px"
							class="input" name="code" id="code" onfocus="clear();" /> <img
							src="${ctx}/catcha/captchaImage" width="55" height="27"
							id="kaptchaImage" style="margin-bottom: 4px" /> <a
							href="javascript:changeKaptchaImage();">看不清楚？</a><span id="errorCode"><c:if test="${error == 0}">验证码输入错误</c:if></span>
					</div>
					<div>
						<label>&nbsp;</label> <input type="submit" class="submit btn_blue"
							value="登录" />
					</div>
				</form>
			</div>

		</div>

	</div>
	</div>


	<div class="footer_box">
		<div class="footer">
			<p>
			© CopyRight 2012-2018, E-AtW.COM, Inc.All Rights Reserved
			</p>
		</div>
	</div>

<script src="${ctx}/resources/script/validate/jquery-1.4.min.js" type="text/javascript"></script>
<%--     <script src="${ctx}/resources/script/jquery.soChange-min.js"></script> --%>
	<script src="${ctx}/resources/script/common.js"></script>
	<script type="text/javascript" src="${ctx}/resources/script/validate/jquery.validate.js"></script>
<script type="text/javascript" src="${ctx}/resources/script/validate/jquery.metadata.js"></script>
<script type="text/javascript" src="${ctx}/resources/script/validate/additional-methods.js" charset="utf-8"></script>
<script type="text/javascript" src="${ctx}/resources/script/validate/messages_cn.js" charset="utf-8"></script>
	<script>
		$(function() {
			$('#kaptchaImage').click(
					function() {//生成验证码  		
						$(this).hide().attr(
								'src',
								'${ctx}/catcha/captchaImage?'
										+ Math.floor(Math.random() * 100))
								.fadeIn();
					});			

			
		});

		/**
		 * 改变验证码
		 */
		function changeKaptchaImage() {
			$("#kaptchaImage").hide().attr(
					'src',
					'${ctx}/catcha/captchaImage?'
							+ Math.floor(Math.random() * 100)).fadeIn();
		}
		
		function clear(){		
			
			$("#errorCode").text("");
		};
        
		function clearAccount(){
			$("#account").next("span").text("");
		}
		
		
// 		$('#change_3 .a_bigImg').soChange({
// 			thumbObj:'#change_3 .ul_change_a2 span',
// 			//导航为数字形式，选择器指向包含数字的span对象
// 			thumbNowClass:'on',
// 			//自定义导航对象当前class为on
// 			changeTime:4000//自定义切换时间为4000ms
// 		});	

	</script>

</body>
</html>

